Backport: Skip pull_request triggered runs in private repos - 6.9 Branch - #12985
Draft
desrosj wants to merge 2 commits into
Draft
Backport: Skip pull_request triggered runs in private repos - 6.9 Branch#12985desrosj wants to merge 2 commits into
desrosj wants to merge 2 commits into
Conversation
This modifies the conditions for GitHub Actions workflow runs so that they do not run within private forks and mirrors for `pull_request` events when the PR is in `draft` status. For situations where this may be desirable, a `Draft Workflow Runs` label can be added to a `draft` pull request to force workflows to run. Props desrosj, jorbin. See #65848. git-svn-id: https://develop.svn.wordpress.org/trunk@63183 602fd350-edb4-49c9-b593-d223f7449a82
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This backports 15c4b04 (r63183) to the 6.9 branch.
Merge Conflict Resolution
The cherry-pick conflicted. Details of every adaptation:
Files from the original commit that do not exist on
6.9(hunks dropped entirely)These three workflow files were reported as
modify/deleteconflicts (deleted inHEAD, modified by the cherry-pick). The cherry-pick left the trunk version in the tree; each wasgit rm'd because the file does not exist on this branch and has no differently-named equivalent here:.github/workflows/javascript-type-checking.yml.github/workflows/phpstan-static-analysis.yml.github/workflows/test-and-zip-default-themes.yml.github/workflows/phpunit-tests.yml(content conflict, 6 hunks)prepare-gutenbergjob — dropped. Trunk added the newif:to aprepare-gutenbergjob that callsreusable-prepare-gutenberg.yml. That job does not exist on6.9, so the hunk was dropped rather than introducing a new job.secrets:blocks — kept the6.9version. Trunk listsCODECOV_TOKEN/WPT_REPORT_API_KEYexplicitly;6.9usessecrets: inherit.secrets: inheritwas preserved unchanged in all five jobs — only theif:expression was replaced.test-with-mysql,test-with-mariadb,test-innovation-releases,html-api-test-groups(allstartsWith( github.repository, 'WordPress/' ) && ( ... )shape) and tolimited-matrix-for-forks(the fork-only! startsWith( ... ) && github.event_name == 'pull_request'shape).uses:changes reverted (out of scope for this branch)The original commit also switched three
uses:references fromWordPress/wordpress-develop/.github/workflows/<x>.yml@trunkto the local./.github/workflows/<x>.ymlform. The6.9branch contains noreusable-*.ymlworkflow files at all, so those local paths would not resolve. All three were reverted to the@trunkform; only theif:conditions were carried over:.github/workflows/upgrade-develop-testing.yml—reusable-build-package.yml.github/workflows/upgrade-develop-testing.yml—reusable-upgrade-testing.yml.github/workflows/workflow-lint.yml—reusable-workflow-lint.ymlApplied cleanly (no adaptation needed)
coding-standards.yml(2 jobs),end-to-end-tests.yml,javascript-tests.yml,performance.yml(determine-matrix, including the! contains( github.event.before, '00000000' )clause),php-compatibility.yml,test-build-processes.yml,workflow-lint.yml(if:only), andupgrade-develop-testing.yml(if:only).Verification
git diff upstream/6.9 --stattouches only.github/workflows/(9 files).git grep -E '^(<<<<<<<|=======|>>>>>>>)' -- .githubreturns nothing).if:gate of the affected family on6.9was audited via grep; no job in the in-scope files was missed. Slack-notification jobs and workflows the original commit did not touch (check-built-files.yml,cleanup-pull-requests.yml,local-docker-environment.yml,props-bot.yml,pull-request-comments.yml) were left alone.Use of AI Tools
This pull request was created by an AI agent (Claude Code). Until this PR is marked "Ready for Review", treat it as untrusted, AI-created code that requires a manual review by a human team member.